<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sp" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="fmt" uri="/jsp/jstl/fmt"%>
<%@ taglib prefix="ab" uri="/archerdu/commons"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>My JSP 'add.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
<meta http-equiv="description" content="This is my page" />
<link rel="stylesheet" type="text/css" href="/css/reset.css" />
<link rel="stylesheet" type="text/css" href="/css/common.css" />
<script type="text/javascript" src="/js/jquery-1.8.2.min.js"></script>
</head>

<body class="mainframe">
  <ul>
    <li><a class="button01" href="/admin/role/add.dhtml">添加角色</a></li>
  </ul>
  <div id="jpage">
    <ab:page url="/admin/role/page.dhtml" page="${ page}" />
  </div>
  <sp:message code="${message.info }" text="" />
  <table id="table_adv" class="admin_table">
    <tr>
      <th width="100">角色</th>
      <th width="100">描述</th>
      <th width="130">添加时间</th>
      <th width="120">编辑</th>
    </tr>
    <c:forEach var="s" items="${page.list}" varStatus="status">
      <tr class="${status.index % 2 == 1 ? 'odd':'even' }">
        <td><a href="/admin/role/edit.dhtml?role.id=<c:out value="${s.id }" />"> <c:out value="${s.name }" />
        </a></td>
        <td><c:out value="${s.note }" /></td>
        <td><fmt:formatDate value="${s.createtime }" pattern="yyyy-MM-dd hh:mm:ss" /></td>
        <td><a href="/admin/role/menu.dhtml?role.id=<c:out value="${s.id }" />"> 目录 </a> <a
          href="/admin/role/function.dhtml?role.id=<c:out value="${s.id }" />"> 权限 </a> <a
          href="/admin/role/edit.dhtml?role.id=<c:out value="${s.id }" />"> 修改 </a> <a id="adv_delete"
          href="/admin/role/remove.dhtml?role.id=${s.id }&pageNo=${page.pageNo}&pageSize=${page.pageSize}"
          onclick="return confirm('是否删除角色');"> 删除 </a></td>
      </tr>
    </c:forEach>
  </table>
</body>
</html>
